package cn.com.bod.fas.common.constant;

/**
 * @description Redis访问相关常量.
 * @author chenyuanxian
 * @date 2019年9月15日 下午7:59:15
 * @version 1.0.0
 * @Copyright (c) scfhdt
 */
public class RedisConstants {
    
    /**
     * Redis缓存失效时间1分钟.
     */
    public static final int REDIS_CACHE_ONE_MINUTE_IN_SECONDS = 60;
    
    /**
     * Redis缓存失效时间1小时.
     */
    public static final int REDIS_CACHE_ON_HOURE_IN_SECONDS = 60 * 60;
    
    /**
     * Redis缓存失效时间30分钟.
     */
    public static final long REDIS_CACHE_HALFHOURE_IN_SECONDS = 30 * 60;
    
    /**
     * Redis缓存失效时间1周.
     */
    public static final int REDIS_CACHE_ONE_WEEK_IN_SECONDS = 7 * 24 * 60 * 60;
    
    /**
     * 30毫秒
     */
    public static final Long THIRTY_MILLSECOND = 30L;
    
    /**
     * 1秒的纳秒数.
     */
    public static final long ONE_SECOND_IN_NANOSECONDS = 1000000L;
    
    /**
     * 缓存根前缀.
     */
    public static final String ROOT_PREFIX = "contract:";
    
    public static final String VALID_CODE = "validCode:";
    
    public static final String LOGIN_VALID_CODE = "validCode:login:";
    
    public static final String USER_LOGIN_VALID_CODE = "validCode:login:user:";

    public static final String VEHI_BRAND_PREFIX = "vehi:brand:";

    public static final String VEHI_DEMIO_PREFIX = "vehi:demio:";

    public static final String VEHI_MODEL_PREFIX = "vehi:model:";

    /*-----------用户会话缓存开始-----------*/
    
    
    
    /*-----------业务主键名开始-----------*/
    
    public static final String SCFHDT_PK = ROOT_PREFIX + "pk";
    
    
    public static final String T_SYS_SEND_MESSAGE_LOG = SCFHDT_PK + "";
    
    /*-----------业务主键名结束-----------*/
    
    /*--------------------Redis分布式锁键名开始------------------------*/
    /**
     * 分布式同步锁命名空间.
     */
    public static final String REDIS_SYNC_LOCK = ROOT_PREFIX + "syncLock:";
    
    /**
     * 扣减余额分布式锁键名.
     */
    public static final String REDIS_SYNC_LOCK_UPDATE_BALANCE = REDIS_SYNC_LOCK + "updateBalance";
    
    

    /*--------------------Redis分布式锁键名结束-------------------------*/
    


    /**
     * Spring缓存键名前缀.
     */
    public static final String QUERY_CACHE = ROOT_PREFIX + "queryCache:";
    
    /*--------------------组织机构缓存键名开始-------------------------*/
    /**
     * 组织机构缓存键名前缀.
     */
    public static final String DEPT_SON_ONE = ROOT_PREFIX + "dept:set:dept_son_one";
    
    public static final String HASH_DEPT = ROOT_PREFIX + "dept:hash_dept_";
    
    public static final String SET_DEPT_SON = "dept:set_dept_son";
    
    /*--------------------组织机构缓存键名结束-------------------------*/
    
    private RedisConstants() {
        
    }
}
